<template>
  <div class="myself">
    <div class="top">
      <van-icon name="user-circle-o"></van-icon>
      {{ $store.state.user.username }}
      <van-button type="default" size="small" @click="logout">退出</van-button>
    </div>
    <van-cell title="我的订单" is-link value="全部订单" />
    <van-tabbar v-model="active">
      <van-tabbar-item icon="balance-o">代付款</van-tabbar-item>
      <van-tabbar-item icon="logistics">待收货</van-tabbar-item>
      <van-tabbar-item icon="setting-o">退换修</van-tabbar-item>
    </van-tabbar>
    <div class="content">
      <van-cell title="会员福利" icon="location-o" is-link />
      <van-cell title="会员福利" icon="location-o" is-link />
      <van-cell title="会员福利" icon="location-o" is-link />
      <van-cell title="会员福利" icon="location-o" is-link />
      <van-cell title="会员福利" icon="location-o" is-link />
      <van-cell title="会员福利" icon="location-o" is-link />
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: "",
    };
  },
  methods:{
    logout(){
      this.$store.commit('userChange',{type:'del'})
      this.$router.push('/login')
    }
  }
};
</script>

<style lang="scss" scoped>
.myself {
  .top {
    z-index: 10;
    position: fixed;
    top: 0;
    display: flex;
    align-items: center;
    width: 100%;
    height: 60px;
    padding: 0 10px;
    background: orange;
    .van-icon-user-circle-o {
      font-size: 40px;
    }
  }
  .van-cell--clickable {
    margin-top: 60px;
    border-bottom: 1px solid gray;
  }
  .van-hairline--top-bottom {
    position: absolute;
    top: 100px;
  }
}
</style>